package com.martian.mapper;

import com.martian.pojo.dto.CommentDetailDto;
import com.martian.pojo.dto.CommentDto;
import com.martian.pojo.form.CommentForm;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

@Mapper
@Repository
public interface CommentMapper {
    void insertComment(CommentForm commentForm);

    List<CommentDetailDto> selectInnerComment(Set<Integer> disCommentIds);

    Integer selectCommentLikeNum(Integer commentId);

    List<CommentDetailDto> selectAllComments();

    Integer selectNumComments();

    Integer selectCommentLike(Integer userId,Integer commentId);

    void likeComment(Integer userId, Integer commentId,Integer like, Date curDate);

    void dislikeComment(Integer userId,Integer commentId);

    List<CommentDetailDto> selectCommentForDetail(Integer movieId, Integer parentId);
}
